package com.pai4j.jianlipai.repository.dao.jianlibot;
import com.pai4j.jianlipai.repository.entity.jianlibot.JianLiPaiResumeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *  简历DAO接口
 *
 * @author: CYM-pai
 * @date: 2025/07/14 18:11
 **/
@Repository
public interface IJianLiPaiResumeDAO extends JpaSpecificationExecutor<JianLiPaiResumeEntity>,
        JpaRepository<JianLiPaiResumeEntity, Long> {

    JianLiPaiResumeEntity findAllByResumeId(String resumeId);

    JianLiPaiResumeEntity findAllByResumeIdAndCreateBy(String resumeId, String userId);

    JianLiPaiResumeEntity findAllByResumeIdAndCreateByAndDeleted(String resumeId, String userId, Boolean deleted);

    List<JianLiPaiResumeEntity> findAllByCreateByAndDeletedOrderByIdDesc(String userId, Boolean deleted);
}